{extend name="public/base"/}
{block name="body"}
<div class="main-box no-header clearfix">
	
	<!-- 标题栏 -->
	<header class="main-box-header clearfix">
		<div class="pull-left">
			<h2>收款信息</h2>
		</div>
		<div class="pull-right">
		</div>
	</header>

	<div class="main-box-body clearfix">
		<!-- 修改密码表单 -->
		<form method="post" class="form-horizontal">
			<div class="form-group">
				<label class="col-sm-3 control-label no-padding-right">收款方式</label>
				<div class="col-sm-9">
					<label class="radio-inline">
						<input type="radio" name="payment_type" value="bank" {if $info.payment_type =="bank"}checked {/if}/> 银行卡
					</label>
					<label class="radio-inline">
						<input type="radio" name="payment_type" value="alipay" {if $info.payment_type =="alipay"}checked {/if}/> 支付宝
					</label>
					<label class="radio-inline">
						<input type="radio" name="payment_type" value="weixin"  {if $info.payment_type =="weixin"}checked {/if}/> 微信
					</label>
				</div>
			</div>

			<div id="bank" style="display: none;">
				<div class="form-group">
					<div class="col-sm-9 col-sm-offset-3">
						<label class="checkbox-inline">
							<input type="checkbox" name="is_company" class="form-control" {if $info.card_number =="on"}checked {/if}style="width:25%;"/>
							<span>对公帐户</span>
						</label>
					</div>
				</div>
				<div class="form-group">
				<label for="inputEmail1" id="input_card_holder_name" class="col-lg-2 control-label">持卡人姓名</label>
				<div class="col-lg-10">
					<input type="text" class="form-control" name="card_holder_name" id="card_holder_name" value="{$info.card_holder_name}" style="width:50%;">
					</div>
				</div>        
			   <div class="form-group">
				<label for="inputEmail1" class="col-lg-2 control-label">银行卡号</label>
				<div class="col-lg-10">
					<input type="text" class="form-control" name="card_number" id="card_number" value="{$info.card_number}" placeholder="银行卡号" style="width:50%;">
					</div>
				</div>
				<div class="form-group">
					<label class="col-lg-2 control-label">收款银行</label>
					<div class="col-lg-10">
						<select name="card_bank_name" class="form-control" data-placeholder="选择收款银行" style="width:auto;">
							<option value=""></option>
								<option value="招商银行" {if $info.card_bank_name =="招商银行"}selected {/if}>招商银行</option>
								<option value="中国工商银行" {if $info.card_bank_name =="中国工商银行"}selected {/if}>中国工商银行</option>
								<option value="中国农业银行" {if $info.card_bank_name =="中国农业银行"}selected {/if}>中国农业银行</option>
								<option value="中国银行" {if $info.card_bank_name =="中国银行"}selected {/if}>中国银行</option>
								<option value="中国建设银行" {if $info.card_bank_name =="中国建设银行"}selected {/if}>中国建设银行</option>
								<option value="交通银行" {if $info.card_bank_name =="交通银行"}selected {/if}>交通银行</option>
								<option value="中国邮政储蓄银行" {if $info.card_bank_name =="中国邮政储蓄银行"}selected {/if}>中国邮政储蓄银行</option>
							</select>
	</div>
</div>
<div class="form-group">
	<label class="col-lg-2 control-label">收款行所在省份</label>
	<div class="col-lg-10">
		<select name="card_bank_province"  class="form-control" style="width:auto;">
			<option value=""></option>
			<option value="北京" {if $info.card_bank_province =="北京"}selected {/if}>北京</option>
			<option value="广东" {if $info.card_bank_province =="广东"}selected {/if}>广东</option>
			<option value="山东" {if $info.card_bank_province =="山东"}selected {/if}>山东</option>
			<option value="江苏" {if $info.card_bank_province =="江苏"}selected {/if}>江苏</option>
			<option value="河南" {if $info.card_bank_province =="河南"}selected {/if}>河南</option>
			<option value="上海" {if $info.card_bank_province =="上海"}selected {/if}>上海</option>
			<option value="河北" {if $info.card_bank_province =="河北"}selected {/if} >河北</option>
			<option value="浙江" {if $info.card_bank_province =="浙江"}selected {/if} >浙江</option>
			<option value="香港" {if $info.card_bank_province =="香港"}selected {/if} >香港</option>
			<option value="陕西" {if $info.card_bank_province =="陕西"}selected {/if} >陕西</option>
			<option value="湖南" {if $info.card_bank_province =="湖南"}selected {/if} >湖南</option>
			<option value="重庆" {if $info.card_bank_province =="重庆"}selected {/if} >重庆</option>
			<option value="福建" {if $info.card_bank_province ==">福建"}selected {/if} >福建</option>
			<option value="天津" {if $info.card_bank_province =="天津"}selected {/if} >天津</option>
			<option value="云南" {if $info.card_bank_province =="云南"}selected {/if} >云南</option>
			<option value="四川" {if $info.card_bank_province =="四川"}selected {/if} >四川</option>
			<option value="广西" {if $info.card_bank_province =="广西"}selected {/if} >广西</option>
			<option value="安徽" {if $info.card_bank_province =="安徽"}selected {/if} >安徽</option>
			<option value="海南" {if $info.card_bank_province =="海南"}selected {/if} >海南</option>
			<option value="江西" {if $info.card_bank_province =="江西"}selected {/if} >江西</option>
			<option value="湖北" {if $info.card_bank_province =="湖北"}selected {/if} >湖北</option>
			<option value="山西" {if $info.card_bank_province =="山东"}selected {/if} >山西</option>
			<option value="辽宁" {if $info.card_bank_province =="辽宁"}selected {/if} >辽宁</option>
			<option value="台湾" {if $info.card_bank_province =="台湾"}selected {/if} >台湾</option>
			<option value="黑龙江" {if $info.card_bank_province =="黑龙江"}selected {/if} >黑龙江</option>
			<option value="内蒙古" {if $info.card_bank_province =="内蒙古"}selected {/if} >内蒙古</option>
			<option value="澳门" {if $info.card_bank_province =="澳门"}selected {/if} >澳门</option>
			<option value="贵州" {if $info.card_bank_province =="贵州"}selected {/if} >贵州</option>
			<option value="甘肃" {if $info.card_bank_province =="甘肃"}selected {/if} >甘肃</option>
			<option value="青海" {if $info.card_bank_province =="青海"}selected {/if} >青海</option>
			<option value="新疆" {if $info.card_bank_province =="新疆"}selected {/if} >新疆</option>
			<option value="西藏" {if $info.card_bank_province =="西藏"}selected {/if} >西藏</option>
			<option value="吉林" {if $info.card_bank_province =="吉林"}selected {/if} >吉林</option>
			<option value="宁夏" {if $info.card_bank_province =="宁夏"}selected {/if} >宁夏</option>
			</select>
					</div>
				</div>
				<div class="form-group">
					<label class="col-lg-2 control-label">收款行所在城市</label>
					<div class="col-lg-10">
						<input type="text" name="card_bank_city" value="{$info.card_bank_city}" class="form-control" style="width:50%;"/>
					</div>
				</div>
				<div class="form-group">
					<label class="col-lg-2 control-label">支行名称</label>
					<div class="col-lg-10">
						<input type="text" name="card_bank_branch" value="{$info.card_bank_branch}" class="form-control" style="width:50%;"/>
					</div>
				</div>
			</div>
			<div id="alipay" style="display: none;">

				<div class="form-group">
					<label class="col-lg-2 control-label">帐号</label>
					<div class="col-lg-10">
						<input type="text" name="alipay_account_number" value="{$info.alipay_account_number}" class="form-control" style="width:50%;"/>
					</div>
				</div>
				<div class="form-group">
					<label class="col-lg-2 control-label">姓名</label>
					<div class="col-lg-10">
						<input type="text" name="alipay_account_name" value="{$info.alipay_account_name}"  class="form-control" style="width:50%;"/>
					</div>
				</div>
			</div>
			<div id="weixin" style="display: none;">
				<div class="form-group">
					<label class="col-lg-2 control-label">微信号</label>
					<div class="col-lg-10">
						<input type="text" name="weixin_account" value="{$info.weixin_account}" class="form-control" style="width:50%;"/>
					</div>
				</div>
				<div class="form-group">
					<label class="col-lg-2 control-label">昵称</label>
					<div class="col-lg-10">
						<input type="text" name="weixin_nickname" value="{$info.weixin_nickname}"  class="form-control" style="width:50%;"/>
					</div>
				</div>
			</div>
			<div class="form-group">
				<div class="col-lg-offset-2 col-lg-10">
					<button type="submit" class="btn btn-primary submit-btn ajax-post" target-form="form-horizontal">确 认</button>
					<button class="btn btn-default btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
				</div>
			</div>
		</form>
	</div>
</div>
{/block}
{block name="script"}
<script type="text/javascript">
	var payment_type = "{$info.payment_type}";
	switch (payment_type)
	{
		case "bank":
			$('#bank').show();
			$('#alipay').hide();
			$('#weixin').hide();
			break;
		case "alipay":
			$('#alipay').show();
			$('#bank').hide();
			$('#weixin').hide();
			break;
		case "weixin":
			$('#weixin').show();
			$('#bank').hide();
			$('#alipay').hide();
			break;
	}
	$(function(){
		if (!payment_type)
		{
			$('#bank').show();
		}
		$(":radio").click(function(){
			if($(this).val() =="bank"){
				$('#bank').show();
				$('#alipay').hide();
				$('#weixin').hide();
			}else if($(this).val() =="alipay"){
				$('#alipay').show();
				$('#bank').hide();
				$('#weixin').hide();
			}else{
				$('#weixin').show();
				$('#bank').hide();
				$('#alipay').hide();
			}
		})
		$(":checkbox").click(function(){
			if ($(this).is(':checked')) { 
				$('#input_card_holder_name').text("公司名称");
			}else{
				$('#input_card_holder_name').text("持卡人姓名");
			}
		})
		
	})
</script>
{/block}